package com.liaowei.comment.openfeign;

import com.liaowei.comment.config.OpenFeignConfig;
import com.liaowei.common.BaseResponse;
import com.liaowei.model.vo.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "user-service",configuration = OpenFeignConfig.class)
public interface UserClient {

    // 根据用户id查询用户
    @GetMapping("/users/{userId}")
    BaseResponse<UserVO> getById(@PathVariable Long userId);
}
